/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sp.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Thosan Girisona S
 */
@Entity
@Table(name = "pcl")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pcl.findAll", query = "SELECT p FROM Pcl p"),
    @NamedQuery(name = "Pcl.findByKodepcl", query = "SELECT p FROM Pcl p WHERE p.kodepcl = :kodepcl"),
    @NamedQuery(name = "Pcl.findByNama", query = "SELECT p FROM Pcl p WHERE p.nama = :nama"),
    @NamedQuery(name = "Pcl.findByKodetim", query = "SELECT p FROM Pcl p WHERE p.kodetim = :kodetim"),
    @NamedQuery(name = "Pcl.findByKodekortim", query = "SELECT p FROM Pcl p WHERE p.kodekortim = :kodekortim"),
    @NamedQuery(name = "Pcl.findByCapi", query = "SELECT p FROM Pcl p WHERE p.capi = :capi"),
    @NamedQuery(name = "Pcl.findByNim", query = "SELECT p FROM Pcl p WHERE p.nim = :nim"),
    @NamedQuery(name = "Pcl.findByEmail", query = "SELECT p FROM Pcl p WHERE p.email = :email")})
public class Pcl implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "KODEPCL")
    private String kodepcl;
    @Column(name = "NAMA")
    private String nama;
    @Column(name = "KODETIM")
    private String kodetim;
    @Column(name = "KODEKORTIM")
    private String kodekortim;
    @Basic(optional = false)
    @Column(name = "CAPI")
    private boolean capi;
    @Column(name = "NIM")
    private String nim;
    @Column(name = "EMAIL")
    private String email;

    public Pcl() {
    }

    public Pcl(String kodepcl) {
        this.kodepcl = kodepcl;
    }

    public Pcl(String kodepcl, boolean capi) {
        this.kodepcl = kodepcl;
        this.capi = capi;
    }

    public String getKodepcl() {
        return kodepcl;
    }

    public void setKodepcl(String kodepcl) {
        this.kodepcl = kodepcl;
    }

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public String getKodetim() {
        return kodetim;
    }

    public void setKodetim(String kodetim) {
        this.kodetim = kodetim;
    }

    public String getKodekortim() {
        return kodekortim;
    }

    public void setKodekortim(String kodekortim) {
        this.kodekortim = kodekortim;
    }

    public boolean getCapi() {
        return capi;
    }

    public void setCapi(boolean capi) {
        this.capi = capi;
    }

    public String getNim() {
        return nim;
    }

    public void setNim(String nim) {
        this.nim = nim;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (kodepcl != null ? kodepcl.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pcl)) {
            return false;
        }
        Pcl other = (Pcl) object;
        if ((this.kodepcl == null && other.kodepcl != null) || (this.kodepcl != null && !this.kodepcl.equals(other.kodepcl))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sp.model.Pcl[ kodepcl=" + kodepcl + " ]";
    }
    
}
